﻿using System;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Media;

namespace Minigolf
{
    public class CTManager : ContentManager
    {

        public CTManager(IServiceProvider Service, string Root) 
            : base(Service, Root) { }

        public override T Load<T>(string assetName)
        {
            if (typeof(T).Equals(typeof(Texture2D))) assetName = "Materials/" + assetName;
            if (typeof(T).Equals(typeof(SpriteFont))) assetName = "Fonts/" + assetName;
            if (typeof(T).Equals(typeof(SoundEffect))) assetName = "Sounds/" + assetName;
            if (typeof(T).Equals(typeof(Song))) assetName = "Music/" + assetName;

            return base.Load<T>(assetName);
        }

    }
}
